<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="../../admin.inc.jsp"%>
<script>
function callback(success, msg) {
	if (success) {
		alertMsg.info(msg);
	}else{
		alertMsg.warn(msg);
	}
}

</script>
<div class="pageContent">
	<s:form name="myForm" id="form_modelOrder_detail" action="/admin/modelOrder/detail"
		method="POST" enctype="multipart/form-data" target="hidden_frame">
		<div class="panelBar">
			<ul class="toolBar">
	            <c:if test="${item.status == '03'}">
	            <li><a iconClass="arrow_rotate_anticlockwise" href="${webContextPath}/admin/modelOrder/toReturnAmount?orderNumber=${item.orderNumber}" target="dialog" mask="true"
	               width="450" height="350" title="退款">
	               <span>退款</span>
	            </a></li>
	            </c:if>
	        </ul>
		</div>
		<div class="pageFormContent" layoutH="255">
			<p>
				<label>订单号：</label>
				<input type="text" name="item.orderNumber" value="${item.orderNumber}"  readonly>
			</p>
			
			<p>
				<label>下单时间：</label>
				<input type="text" name="item.createTime" 
				value="<fmt:formatDate value='${item.createTime}' pattern="yyyy-MM-dd HH:mm:ss" />" readonly="true">
			</p>

			<p>
				<label>商品：</label>
				<input type="text" name="item.subjectName" value="${item.subjectName }" readonly>
			</p>
			
			<p>
				<label>数量：</label> 
				<input type="text" name="item.subjectNum" value="${item.subjectNum}"  readonly>
			</p>
			
			<p>
				<label>总额：</label> 
				<input type="text" name="item.totalAmount" value="${item.totalAmount}"  readonly>
			</p>
			
			<p>
				<label>姓名：</label> 
				<input type="text" name="item.subjectNum" value="${item.name}"  readonly>
			</p>
			
			<p>
				<label>电话：</label> 
				<input type="text" name="item.subjectNum" value="${item.phoneNo}"  readonly>
			</p>
			
			<p class="nowrap">
				<label>地址：</label>
				<textarea class="textInput" name="item.address" rows="10" cols="35"  readonly>${item.address }</textarea>
			</p>
			
			<p class="nowrap">
				<label>方案：</label>
			</p>
			
			<p>
				<label style="width:100px;">模特人数：</label>
				<input type="text" name="solution.modelNum"  value="${solution.modelNum}"  readonly>
			</p>
			
			<p>
				<label style="width:100px;">工作城市：</label>
				<select id="workCityCode" name="solution.workCityCode"  disabled="disabled">
					<c:forEach var="item1" items="${cityList}">
		            	<option value="${item1.code}"  ${solution.workCityCode==item1.code?"selected":""}>${item1.name}</option>
		            </c:forEach>
				</select>
			</p>
			
			<p>
				<label style="width:100px;">工作地点：</label>
				<input type="text" name="solution.workAddress"  value="${solution.workAddress}"  readonly>
			</p>
		
			<p>
				<label style="width:100px;">总工作小时数：</label>
				<input type="text" name="solution.workHours"  value="${solution.workHours}"  readonly>
			</p>
			
			<p>
				<label style="width:100px;">工作类型：</label>
				<input type="text" name="solution.workType"  value="${solution.workType}"  readonly>
			</p>
			
			<c:if test="${modelList != null}">
				<table class="table" width="70%" >
					<thead>
						<tr>
							<th width="40">序号</th>
							<th width="50">模特ID</th>
							<th width="70">模特名称</th>
							<th width="40">工作开始时间</th>
							<th width="40">工作结束时间</th>
							<th width="70">总工作小时数</th>
						</tr>
					</thead>
					<tbody style="text-align:center">
						<c:forEach var="item2" items="${modelList}"  varStatus="status">
							<tr target="modelId" rel="${item2.id}" style="">
								<td>${ status.index + 1}</td>
								<td>${item2.modelId}</td>
								<td>${item2.modelName}</td>
								<td><fmt:formatDate value='${item2.workStartTime}' pattern="yyyy-MM-dd HH:mm:ss" /></td>
								<td><fmt:formatDate value='${item2.workEndTime}' pattern="yyyy-MM-dd HH:mm:ss" /></td>
								<td>${item2.workHours}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				</c:if>
		</div>
		
		<c:if test="${modelExtendList != null}">
				<table class="table" width="70%" >
					<thead>
						<tr>
							<th width="40">序号</th>
							<th width="50">模特ID</th>
							<th width="70">模特名称</th>
							<th width="40">工作日期</th>
							<th width="50">加时工作小时数</th>
							<th width="50">单价</th>
							<th width="50">总金额</th>
						</tr>
					</thead>
					<tbody style="text-align:center">
						<c:forEach var="item2" items="${modelExtendList}"  varStatus="status">
							<tr target="modelExtendId" rel="${item2.id}" style="">
								<td>${ status.index + 1}</td>
								<td>${item2.modelId}</td>
								<td>${item2.modelName}</td>
								<td><fmt:formatDate value='${item2.workDate}' pattern="yyyy-MM-dd" /></td>
								<td>${item2.addWorkHours}</td>
								<td>${item2.unitAmount}</td>
								<td>${item2.totalAmount}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				</c:if>
		</div>
	</s:form>
</div>
<iframe name='hidden_frame' id="hidden_frame" style='display: none'></iframe>